#include "OBJManager.h"

void OBJManager::LoadMesh(const std::string& filepath, const std::string& Tag)
{
	std::map<std::string, OBJMesh>::iterator it = TheMeshMap.find(Tag);

	if(it == TheMeshMap.end())
	{
		OBJMesh TempMesh;

		TempMesh.Load(filepath);

		TheMeshMap[Tag] = TempMesh;
	}
}


void OBJManager::GetMesh(const std::string& Tag)
{
	//TheMeshMap[Tag].DrawUsingVertexArray();
	TheMeshMap[Tag].Draw();
}

OBJMesh* OBJManager::ReturnMesh( const std::string& Tag )
{
	return &TheMeshMap[Tag];
}
